package org.lvgo.builder.demo2;

/**
 * @author lvgo
 * @version 1.0
 * @Description: 8条腿的人构建器
 * @date 18-8-21 下午5:24
 */
public class EightLegPersonBuilder implements PersonBuilder {
    @Override
    public Eyes buildEyes() {
        System.out.println("正在创建人物眼睛。。。");
        try {
            Thread.sleep(2000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return new Eyes(12, "水蓝色");
    }

    @Override
    public Hair buildHair() {
        System.out.println("正在创建人物头发。。。");
        try {
            Thread.sleep(1000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("头发创建失败，该人物是个秃子");
        try {
            Thread.sleep(1000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return new Hair("没有颜色");
    }

    @Override
    public Leg buildLeg() {
        System.out.println("正在创建人物的腿。。。");
        try {
            Thread.sleep(2000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return new Leg(8);
    }
}
